@file:Suppress("unused")

package top.techqi.core.kext

/* ========== 存储空间(字节) ========== */
inline val Int.KB: Int
    get() = this * 1024
inline val Int.MB: Int
    get() = this.KB * 1024
inline val Int.GB: Int
    get() = this.MB * 1024
inline val Int.TB: Int
    get() = this.GB * 1024
inline val Int.PB: Int
    get() = this.TB * 1024

inline val Long.KB: Long
    get() = this * 1024
inline val Long.MB: Long
    get() = this.KB * 1024
inline val Long.GB: Long
    get() = this.MB * 1024
inline val Long.TB: Long
    get() = this.GB * 1024
inline val Long.PB: Long
    get() = this.TB * 1024

inline val Float.KB: Float
    get() = this * 1024
inline val Float.MB: Float
    get() = this.KB * 1024
inline val Float.GB: Float
    get() = this.MB * 1024
inline val Float.TB: Float
    get() = this.GB * 1024
inline val Float.PB: Float
    get() = this.TB * 1024

inline val Double.KB: Double
    get() = this * 1024
inline val Double.MB: Double
    get() = this.KB * 1024
inline val Double.GB: Double
    get() = this.MB * 1024
inline val Double.TB: Double
    get() = this.GB * 1024
inline val Double.PB: Double
    get() = this.TB * 1024


/* ========== 时间单位(毫秒) ========== */
inline val Int.SECONDS: Int
    get() = this * 1000
inline val Int.MINUTES: Int
    get() = this.SECONDS * 60
inline val Int.HOURS: Int
    get() = this.MINUTES * 60
inline val Int.DAYS: Int
    get() = this.HOURS * 24

inline val Long.SECONDS: Long
    get() = this * 1000
inline val Long.MINUTES: Long
    get() = this.SECONDS * 60
inline val Long.HOURS: Long
    get() = this.MINUTES * 60
inline val Long.DAYS: Long
    get() = this.HOURS * 24

inline val Float.SECONDS: Float
    get() = this * 1000
inline val Float.MINUTES: Float
    get() = this.SECONDS * 60
inline val Float.HOURS: Float
    get() = this.MINUTES * 60
inline val Float.DAYS: Float
    get() = this.HOURS * 24

inline val Double.SECONDS: Double
    get() = this * 1000
inline val Double.MINUTES: Double
    get() = this.SECONDS * 60
inline val Double.HOURS: Double
    get() = this.MINUTES * 60
inline val Double.DAYS: Double
    get() = this.HOURS * 24
